package com.jade.shoesmallinterface.mapper;

import com.jade.shoesmallinterface.entity.ProductImage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface productImageMapper {
    // 根据产品id查询对应的图片
    @Select("SELECT * FROM product_image WHERE product_id=#{productId}")
    List<ProductImage> selectImageByProductId(Integer productId);

    // 查询所有的图片
    @Select("SELECT * FROM product_image")
    List<ProductImage> selectAllImage();

}
